package cn.ibdsr.human.constant;

import lombok.Getter;
import lombok.Setter;

/**
 * @author liujj
 * @version V1.0
 * @description
 * @createDate 2020/3/4 11:07
 * <p>
 * Date Author Description
 * ------------------------------------------------------
 * 2020/3/4 liujj init
 */
public enum UserStatusEnum {

    /**
     * 正常状态
     */
    NORMAL(1,"正常"),
    /**
     * 已冻结状态
     */
    FROZEN(2,"已冻结"),
    ;

    /**
     * 状态值
     */
    @Setter
    @Getter
    private Integer type;
    /**
     * 状态描述
     */
    @Setter
    @Getter
    private String desc;


    UserStatusEnum(int Integer, String desc){
        this.type = type;
        this.desc= desc;
    }

    public static UserStatusEnum valueOf(int status) {
        for (UserStatusEnum s : UserStatusEnum.values()) {
            if (s.getType() == status) {
                return s;
            }
        }
        return null;
    }


}
